* net/tramp-imap.el (top): Autoload needed packages.
authorMichael Albinus <michael.albinus@gmx.de>
Fri, 22 Jan 2010 21:17:11 +0000 (22:17 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Fri, 22 Jan 2010 21:17:11 +0000 (22:17 +0100)
lisp/ChangeLog
lisp/net/tramp-imap.el

index f7e5164d0497f828dce285844257e0928efb3c48..40018270cb2998d3a6f81cb36296c67192eb8599 100644 (file)
@@ -1,3 +1,7 @@
+2010-01-22  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp-imap.el (top): Autoload needed packages.
+
 2010-01-22  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * mail/rmailmm.el (rmail-mime-handle): Don't set the buffer to unibyte
index da75e2307ca64c84323378fa0c88339a44bae04a..34e85daa3832aa272ff7bafc2bff161323b4218f 100644 (file)
 (require 'assoc)
 (require 'tramp)
 (require 'tramp-compat)
-(require 'message)
-(require 'imap-hash)
-(require 'epa)
+(eval-when-compile (require 'imap-hash))
+
 (autoload 'auth-source-user-or-password "auth-source")
+(autoload 'epg-context-operation "epg")
+(autoload 'epg-context-set-armor "epg")
+(autoload 'epg-context-set-passphrase-callback "epg")
+(autoload 'epg-context-set-progress-callback "epg")
+(autoload 'epg-decrypt-string "epg")
+(autoload 'epg-encrypt-string "epg")
+(autoload 'imap-hash-get "imap-hash")
+(autoload 'imap-hash-make "imap-hash")
+(autoload 'imap-hash-map "imap-hash")
+(autoload 'imap-hash-put "imap-hash")
+(autoload 'imap-hash-rem "imap-hash")
 
 ;; We use the additional header "X-Size" for encoding the size of a file.
-(add-to-list 'imap-hash-headers 'X-Size 'append)
+(eval-after-load "imap-hash"
+  '(add-to-list 'imap-hash-headers 'X-Size 'append))
 
 ;; Define Tramp IMAP method ...
 (defconst tramp-imap-method "imap"
@@ -662,7 +673,8 @@ KEY-ID can be 'SYM or 'PIN among others."
                  (read-passwd
                   (if (eq key-id 'PIN)
                       "Tramp-IMAP passphrase for PIN: "
-                    (let ((entry (assoc key-id epg-user-id-alist)))
+                    (let ((entry (assoc key-id
+                                        (symbol-value 'epg-user-id-alist))))
                       (if entry
                           (format "Tramp-IMAP passphrase for %s %s: "
                                   key-id (cdr entry))